/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.seari.service;

import com.seari.bean.User;
import com.seari.mapper.UserMapper;
import com.seari.pojo.QueryUser;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author Rainbow
 */
@Service("userService")
public class UserServiceImpl implements UserService
{
    @Autowired
    private UserMapper userMapper;

    @Override
    public User getUserByLogin(String username, String password, String stationName)
    {
        return userMapper.getUserByLogin(username, password, stationName);
    }

    @Override
    public List<User> getUserByParams(QueryUser qu)
    {
        return userMapper.getUserByParams(qu);
    }

    @Override
    public int addUser(User user)
    {
        return userMapper.addUser(user);
    }

    @Override
    public int checkUserExist(QueryUser qu)
    {
        return userMapper.checkUserExist(qu);
    }

    @Override
    public int updateUser(User user)
    {
        return userMapper.updateUser(user);
    }

    @Override
    public int deleteUser(int uid)
    {
        return userMapper.deleteUser(uid);
    }
    
}
